package com.haoyeteng.sxbd.modular.fdc.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.haoyeteng.sxbd.modular.business.dao.FDCDutyMapper;
import com.haoyeteng.sxbd.modular.fdc.service.IFDCDutyService;
import com.haoyeteng.sxbd.modular.fdc.pojo.FDCDuty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 用户表 服务实现类
 * </p>
 *
 * @author haoyeteng123
 * @since 2019-05-16
 */
@Service
public class FDCDutyServiceImpl extends ServiceImpl<FDCDutyMapper, FDCDuty> implements IFDCDutyService {

	@Autowired
	private FDCDutyMapper fdcDutyMapper;
	

//
//	/**
//	 * 用户列表查询
//	 */
//	@Override
//	public List<Map<String, Object>> selectUsersAndAuth(Page<User> page, Integer authState, String userName) {
//		return userMapper.selectUsersAndAuth(page, authState, userName);
//	}


	@Override
	public List<Map<String, Object>> selectDuty(Page<FDCDuty> page, String dutyName) {
		return fdcDutyMapper.selectDuty(page, dutyName);
	}

	@Override
	public void insertFdcDuty(FDCDuty fdcDuty) {
		fdcDuty.setCreateTime(new Date());
		fdcDuty.setUpdateTime(new Date());
		fdcDutyMapper.insert(fdcDuty);
	}
}
